package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.IndustryInformationMapper;
import com.ruoyi.system.domain.IndustryInformation;
import com.ruoyi.system.service.IIndustryInformationService;

/**
 * 行业资讯Service业务层处理
 * 
 * @author Eugene
 * @date 2023-04-15
 */
@Service
public class IndustryInformationServiceImpl implements IIndustryInformationService 
{
    @Autowired
    private IndustryInformationMapper industryInformationMapper;

    /**
     * 查询行业资讯
     * 
     * @param id 行业资讯主键
     * @return 行业资讯
     */
    @Override
    public IndustryInformation selectIndustryInformationById(Long id)
    {
        return industryInformationMapper.selectIndustryInformationById(id);
    }

    /**
     * 查询行业资讯列表
     * 
     * @param industryInformation 行业资讯
     * @return 行业资讯
     */
    @Override
    public List<IndustryInformation> selectIndustryInformationList(IndustryInformation industryInformation)
    {
        return industryInformationMapper.selectIndustryInformationList(industryInformation);
    }

    /**
     * 新增行业资讯
     * 
     * @param industryInformation 行业资讯
     * @return 结果
     */
    @Override
    public int insertIndustryInformation(IndustryInformation industryInformation)
    {
        industryInformation.setCreateTime(DateUtils.getNowDate());
        return industryInformationMapper.insertIndustryInformation(industryInformation);
    }

    /**
     * 修改行业资讯
     * 
     * @param industryInformation 行业资讯
     * @return 结果
     */
    @Override
    public int updateIndustryInformation(IndustryInformation industryInformation)
    {
        industryInformation.setUpdateTime(DateUtils.getNowDate());
        return industryInformationMapper.updateIndustryInformation(industryInformation);
    }

    /**
     * 批量删除行业资讯
     * 
     * @param ids 需要删除的行业资讯主键
     * @return 结果
     */
    @Override
    public int deleteIndustryInformationByIds(Long[] ids)
    {
        return industryInformationMapper.deleteIndustryInformationByIds(ids);
    }

    /**
     * 删除行业资讯信息
     * 
     * @param id 行业资讯主键
     * @return 结果
     */
    @Override
    public int deleteIndustryInformationById(Long id)
    {
        return industryInformationMapper.deleteIndustryInformationById(id);
    }
}
